﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using OrderApp;

namespace OrderAppWin
{
    public partial class Items : Form
    {
        public OrderItem orderItem { get; set; }
        public Items()
        {
            InitializeComponent();
        }
        public Items(OrderItem orderItem) : this()
        {
            this.orderItem = orderItem;
            this.itembindingSource.DataSource = orderItem;
            goodsbindingSource.Add(new Goods("1", "面包", 10));
            goodsbindingSource.Add(new Goods("2", "牛肉", 50));
        }
        private void Items_Load(object sender, EventArgs e)
        {

        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            itembindingSource.ResetBindings(false);
        }

        private void Item_ok_Click(object sender, EventArgs e)
        {

        }
    }
}
